import request from '@/utils/request'

// 查询进货管理列表
export function listPurchase(query) {
  return request({
    url: '/purchase/purchase/list',
    method: 'get',
    params: query
  })
}

// 查询进货管理详细
export function getPurchase(pid) {
  return request({
    url: '/purchase/purchase/' + pid,
    method: 'get'
  })
}

// 新增进货管理
export function addPurchase(data) {
  return request({
    url: '/purchase/purchase',
    method: 'post',
    data: data
  })
}

// 修改进货管理
export function updatePurchase(data) {
  return request({
    url: '/purchase/purchase',
    method: 'put',
    data: data
  })
}

// 删除进货管理
export function delPurchase(pid) {
  return request({
    url: '/purchase/purchase/' + pid,
    method: 'delete'
  })
}
